﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<QianBuo.Lottery.Web.Models.TopModel>" %>
<%@ Import Namespace="Code.Models" %>
<div class="top_div_01">
    <div class="top_div_04_02">
        <ul>
            <%foreach (var item in Model.Ratios){%>
            <li><label for='top_redio_<%=item.Key %>'><%=item.Value %>
            <input type="radio" id='top_redio_<%=item.Key %>' name="top_radio_" <%=item.Key==Model.Ratio?"checked='checked'":"" %>
                onclick='<%=item.Key == Model.Ratio ? "return false;" : string.Format("location.href=\"{0}\"", Url.Action("Ratio", new { id = item.Key, ReturnUrl = Request.RawUrl })) %>' />
            </label></li>
             <% } %>
            <% Model.WinModels.Each((p, i) => %>
            <% { %>
                <% if (p.Key==Model.WimModel) %>
                <% { %>
               
            <li><%=i == 0 ? "" : "|&nbsp;"%><a><span class="top_modelspan_cur"><%=p.Value%>模式</span></a></li>
                <% } %>
                <% else %> 
                <% { %>
            <li><%=i == 0 ? "" : "|&nbsp;"%>
                <a href='<%=Url.Action("WinModel", new { id = p.Key, ReturnUrl = Request.RawUrl }) %>'>
                    <span class="top_modelspan"><%=p.Value%>模式</span>
                </a>
            </li>
              

                <%} %>
            <% }); %>
            <li>|&nbsp;<a href="#"><span class='top_help'>联系客服</span></a></li>
            <li>|&nbsp;<a href='<%=Url.Action("Out")%>'><span class='top_help'>退出系统</span></a> </li>
        </ul>
    </div>
    <div class="top_div_03">
        <div class="top_div_02">
        </div>
        <div class="top_div_06">
            <table width="100%" height="33px" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <%  var name = (string)(TempData["Play_Lottery"] ?? null);
                    var route= "true".Equals(TempData["singleplay"]) ? "Play_Single" : "Play";
                    Model.Lotterys.Each((item, i) =>
                    {%>
                    <td align="center" <%=name == item.Key ? "class='lotterymenu_current'" : "" %>>
                        <a href='<%=Url.RouteUrl(route, new { id = item.Key }, null)%>'>
                       <div class='lotterymenu_bg lotterymenu_bg_<%=i %>'></div>
                        <div  style="font-size:12px" <%=name == item.Key ? "class='div_currentlottery'" : "" %>><%=item.Value%></div>
                        </a>
                    </td>
                    <%}); %>
                </tr>
            </table>
        </div>
    </div>
</div>
